package com.fish.service.impl.passport;

import java.util.List;
import java.util.Map;

import com.fish.passport.dao.PassCodeDAO;
import com.fish.passport.dao.PassPortCodeDAO;
import com.fish.passport.po.PassCode;
import com.fish.passport.po.PassPortCode;
import com.fish.service.passport.PassPortService;

/**
 * 通关业务服务实现
 * 
 * @author chenlinjun
 * 
 */
public class PassPortServiceImpl implements PassPortService {
	private PassCodeDAO passCodeDAO;
	private PassPortCodeDAO passPortCodeDAO;
	
	public PassCode getPassCodeBySerialNo(String serialNo) {
		return this.passCodeDAO.getCodeBySerialNo(serialNo);
	}

	public PassPortCode getPassPortByCodeId(String CodeId) {
		return this.passPortCodeDAO.getPassPortByCodeId(CodeId);

	}

	public void updateByCodeId(PassPortCode passPortCode) {
		 this.passPortCodeDAO.updatePassPortCodeByCodeId(passPortCode);
	}

	public void updatePassCode(PassCode passCode) {
		 this.passCodeDAO.updatePassCode(passCode);
	}

	public void updatePassPort(PassPortCode passPort) {
		 this.passPortCodeDAO.updatePassPortCode(passPort);
	}

	/**
	 * 查询通关点信息
	 * 
	 * @param params
	 * @return
	 */

	public List<PassCode> selectPassCodeByParams(Map<String, Object> params) {
		return this.passCodeDAO.selectPassCodeByParams(params);
	}
	/**
	 *  查询通关点信息记录数
	 * @param params
	 * @return
	 */
	public Integer selectRowCount(Map<String,Object> params){
//		return this.passCodeDAO.selectRowCount(params);
		return null;
	}
	/**
	 * 通过通关点编号查询通关点关联信息
	 * 
	 * @param CodeId
	 * @return
	 */
	public List<PassPortCode> searchPassPortByCodeId(String CodeId) {
		return this.passPortCodeDAO.searchPassPortByCodeId(CodeId);
	}

	/**
	 * 通过订单查询通关点信息
	 * 
	 * @param serialNo
	 * @return
	 */

	public List<PassCode> getPassCodeByOrderId(Long orderId){
		 return this.passCodeDAO.getPassCodeByOrderId(orderId);
	}
	
	public void setPassPortCodeDAO(PassPortCodeDAO passPortCodeDAO) {
		this.passPortCodeDAO = passPortCodeDAO;
	}

	public void setPassCodeDAO(PassCodeDAO passCodeDAO) {
		this.passCodeDAO = passCodeDAO;
	}


}
